#include <iostream>
using namespace std;
const int N=11;
int f[1<<N];
void dfs(int left,int right)
{
    if(left>right)
        return;
    char ret;
    int sum=f[right]-f[left-1];
    if(sum==0)ret='B';
    else if(sum==right-left+1)ret='I';
    else ret='F';
    if(left==right)
        {
            cout<<ret;
            return;
        }
    int mid=(right+left)/2;
    dfs(left,mid);dfs(mid+1,right);
     cout<<ret;
}
int main()
{
    int n;cin>>n;
    char ch;
    n=(1<<n);
    for(int i=1;i<=n;i++)
    {
        cin>>ch;
        f[i]=f[i-1]+ch-'0';
    }
    dfs(1,n);
    return 0;
}
